package com.student.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ClassAppraiseAssociation entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Class_Appraise_Association", schema = "dbo", catalog = "StudentManager")
public class ClassAppraiseAssociation implements java.io.Serializable {

	// Fields

	private Long classAppraiseId;
	private RpList rpList;
	private ClassInfo classInfo;
	private Timestamp classAppraiseTime;

	// Constructors

	/** default constructor */
	public ClassAppraiseAssociation() {
	}

	/** minimal constructor */
	public ClassAppraiseAssociation(Long classAppraiseId) {
		this.classAppraiseId = classAppraiseId;
	}

	/** full constructor */
	public ClassAppraiseAssociation(Long classAppraiseId, RpList rpList,
			ClassInfo classInfo, Timestamp classAppraiseTime) {
		this.classAppraiseId = classAppraiseId;
		this.rpList = rpList;
		this.classInfo = classInfo;
		this.classAppraiseTime = classAppraiseTime;
	}

	// Property accessors
	@Id
	@Column(name = "Class_Appraise_id", unique = true, nullable = false, precision = 18, scale = 0)
	@GeneratedValue
	public Long getClassAppraiseId() {
		return this.classAppraiseId;
	}

	public void setClassAppraiseId(Long classAppraiseId) {
		this.classAppraiseId = classAppraiseId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "RP_id")
	public RpList getRpList() {
		return this.rpList;
	}

	public void setRpList(RpList rpList) {
		this.rpList = rpList;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "Class_id")
	public ClassInfo getClassInfo() {
		return this.classInfo;
	}

	public void setClassInfo(ClassInfo classInfo) {
		this.classInfo = classInfo;
	}

	@Column(name = "Class_Appraise_Time", length = 23)
	public Timestamp getClassAppraiseTime() {
		return this.classAppraiseTime;
	}

	public void setClassAppraiseTime(Timestamp classAppraiseTime) {
		this.classAppraiseTime = classAppraiseTime;
	}

}